<div id="carfilter">
  <table>
    <tr>
      <td>Body Style</td>
    </tr>
    <tr>

      <?php foreach ($bodystyle as $b):?>
      <td>
          <?php
          if($sf_params->get('body_style_id',null) == $b->getId()) {
            echo $b->getName();
          }else {
            echo link_to($b->getName(), 'stocklist/index?'.$sf_data->getRaw('params').'body_style_id='.$b->getId().'&name='.to_url_string($b->getName()));
          }
          ?></td>
      <?php endforeach;?>
    </tr>
    <tr>
      <td>Price Range</td>
    </tr>
    <tr>
      <?php foreach ($pricerange as $key => $p):?>
      <td><?php
          if($sf_params->get('price_range_id') == $key) {
            echo $p['name'];
          }else {
            echo link_to($p['name'],'stocklist/index?'.$sf_data->getRaw('params').'price_range_id='.$key);
          }
          ?></td>
        <?php endforeach;?>
    </tr>

  </table>
</div>